<div class="pcb">
	<!--{if $post['warned']}-->
		<span class="y"><a href="forum.php?mod=misc&action=viewwarning&amp;tid=$_G[tid]&amp;uid=$post[authorid]" title="{lang warn_get}" onclick="showWindow('viewwarning', this.href)"><img src="{IMGDIR}/warning.gif" alt="{lang warn_get}" /></a></span>
	<!--{/if}-->
	<!--{if !$post['first'] && !empty($post[subject])}-->
		<h2>$post[subject]</h2>
	<!--{/if}-->

<!--{if $_G['adminid'] != 1 && $_G['setting']['bannedmessages'] & 1 && (($post['authorid'] && !$post['username']) || ($post['groupid'] == 4 || $post['groupid'] == 5))}-->
	<div class="locked">{lang message_banned}</div>
<!--{elseif $_G['adminid'] != 1 && $post['status'] & 1}-->
	<div class="locked">{lang message_single_banned}</div>
<!--{elseif $needhiddenreply}-->
	<div class="locked">{lang message_ishidden_hiddenreplies}</div>
<!--{elseif $post['first'] && $_G['forum_threadpay']}-->
	{template forum/viewthread_pay}
<!--{else}-->
	{hook/viewthread_posttop $postcount}
	<!--{if $_G['setting']['bannedmessages'] & 1 && (($post['authorid'] && !$post['username']) || ($post['groupid'] == 4 || $post['groupid'] == 5))}-->
		<div class="locked">{lang admin_message_banned}</div>
	<!--{elseif $post['status'] & 1}-->
		<div class="locked">{lang admin_message_single_banned}</div>
	<!--{/if}-->
	<!--{if $post['first']}-->
		<!--{if $_G['forum_thread']['price'] > 0 && $_G['forum_thread']['special'] == 0}-->
			<div class="locked"><em class="y"><a href="forum.php?mod=misc&action=viewpayments&tid=$_G[tid]" onclick="showWindow('pay', this.href)">{lang pay_view}</a></em>{lang pay_threads}: <strong>{$_G['setting']['extcredits'][$_G['setting']['creditstransextra'][1]][title]} $_G[forum_thread][price] {$_G['setting']['extcredits'][$_G['setting']['creditstransextra'][1]][unit]} </strong></div>
		<!--{/if}-->
		<!--{if $threadsort && $threadsortshow}-->
			<!--{if $threadsortshow['typetemplate']}-->
				$threadsortshow[typetemplate]
			<!--{elseif $threadsortshow['optionlist'] && !($post['status'] & 1) && !$_G['forum_threadpay']}-->
				<div class="typeoption">
					<!--{if $threadsortshow['optionlist'] == 'expire'}-->
						{lang has_expired}
					<!--{else}-->
						<h4>$_G[forum][threadsorts][types][$_G[forum_thread][sortid]]</h4>
						<table summary="{lang threadtype_option}" cellpadding="0" cellspacing="0" class="formtable datatable">
						<!--{loop $threadsortshow['optionlist'] $option}-->
							<!--{if $option['type'] != 'info'}-->
								<tr class="{echo swapclass('colplural')}">
									<th>$option[title]</th>
									<td><!--{if $option['value']}-->$option[value] $option[unit]<!--{else}-->-<!--{/if}--></td>
								</tr>
							<!--{/if}-->
						<!--{/loop}-->
						</table>
					<!--{/if}-->
				</div>
			<!--{/if}-->						
		<!--{/if}-->
	<!--{/if}-->
	<div class="{if !$_G[forum_thread][special]}t_fsz{else}pcbs{/if}">					
		<!--{if $post['first']}-->
			<!--{if !$_G[forum_thread][special]}-->
				<table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_$post[pid]">$post[message]</td></tr></table>
			<!--{elseif $_G[forum_thread][special] == 1}-->
				{template forum/viewthread_poll}
			<!--{elseif $_G[forum_thread][special] == 2}-->
				{template forum/viewthread_trade}
			<!--{elseif $_G[forum_thread][special] == 3}-->							
				{template forum/viewthread_reward}
			<!--{elseif $_G[forum_thread][special] == 4}-->
				{template forum/viewthread_activity}
			<!--{elseif $_G[forum_thread][special] == 5}-->
				{template forum/viewthread_debate}
			<!--{elseif $threadplughtml}-->
				$threadplughtml
			<!--{/if}-->
		<!--{else}-->
			<table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_$post[pid]">$post[message]</td></tr></table>
		<!--{/if}-->

		<!--{if $post['attachment']}-->
			<div class="locked">{lang attachment}: <em><!--{if $_G['uid']}-->{lang attach_nopermission}<!--{else}-->{lang attach_nopermission_login}<!--{/if}--></em></div>
		<!--{elseif $post['imagelist'] || $post['attachlist']}-->
			<div class="pattl">
				<!--{if $post['imagelist']}-->
					$post['imagelist']
				<!--{/if}-->
				<!--{if $post['attachlist']}-->
					$post[attachlist]
				<!--{/if}-->
			</div>
		<!--{/if}-->
		<!--{if $post['first'] && $sticklist}-->
			<h3 class="psth">{lang replies_recommended}</h3>
			<!--{loop $sticklist $rpost}-->
				<div class="pstl">
					<div class="psta avt">$rpost[avatar]</div>
					<div class="psti">
						<p class="unf">
							<a href="home.php?mod=space&amp;uid=$rpost[authorid]" class="unm">$rpost[author]</a> {lang published_in_floor}
							&nbsp;<em><a href="forum.php?mod=redirect&amp;goto=findpost&amp;ptid=$rpost[tid]&amp;pid=$rpost[pid]">{lang view_full_content}</a></em>
							<!--{if $_G['group']['allowstickreply']}-->&nbsp;<em><a href="javascript:;" onclick="modaction('stickreply', $rpost[pid])">{lang cancel_thread_stick}</a></em> <!--{/if}-->
						</p>
						$rpost[message]
					</div>
				</div>
			<!--{/loop}-->
		<!--{/if}-->
		<div id="comment_$post[pid]" class="cl cm">
		<!--{if $_G['setting']['commentnumber'] && !empty($comments[$post[pid]])}-->
			<h3 class="psth">{lang comments}</h3>
			<!--{if $totalcomment[$post[pid]]}--><div class="pstl">$totalcomment[$post[pid]]</div><!--{/if}-->
			<!--{loop $comments[$post[pid]] $comment}-->
				<div class="pstl">
					<div class="psta avt">$comment[avatar]</div>
					<div class="psti">
						<p class="unf">
							<a href="home.php?mod=space&amp;uid=$comment[authorid]" class="unm">$comment[author]</a>
							<!--{if $comment['authorid'] != $_G['uid']}--><a onclick="showWindow('sendpm', this.href)" href="home.php?mod=spacecp&ac=pm&op=showmsg&handlekey=showmsg_$comment[authorid]&touid=$comment[authorid]&pmid=0&daterange=2&commentid=$comment[id]" target="_blank"><img src="{IMGDIR}/pmto.gif" title="{lang send_pm}" class="vm" /></a>&nbsp<!--{/if}-->
							{lang poston} $comment[dateline]
							<!--{if $_G['forum']['ismoderator'] && $_G['group']['allowdelpost']}-->&nbsp;<em><a href="javascript:;" onclick="modaction('delcomment', $comment[id])">{lang delete}</a></em><!--{/if}-->
						</p>
						$comment[comment]
					</div>
				</div>
			<!--{/loop}-->						
			<!--{if $commentcount[$post[pid]] > $_G['setting']['commentnumber']}--><div class="pg"><a href="javascript:;" class="nxt" onclick="ajaxget('forum.php?mod=misc&action=commentmore&tid=$post[tid]&pid=$post[pid]&page=2', 'comment_$post[pid]')">{lang next_page}</a></div><!--{/if}-->
		<!--{/if}-->
		</div>
	</div>
	{hook/viewthread_postbottom $postcount}
	<!--{if !empty($post['ratelog'])}-->
		<dl class="rate">
			<!--{if $_G['setting']['ratelogon']}-->
				<div class="ratt"><a href="forum.php?mod=misc&action=viewratings&amp;tid=$_G[tid]&amp;pid=$post[pid]" onclick="showWindow('viewratings', this.href)" title="{lang thread_rate_log_lately}">{lang have} <strong>{echo count($postlist[$post[pid]][totalrate]);}</strong> {lang people_score}</a></div>
				<dd style="margin: 0px;">
			<!--{else}-->
				<dt>
					<!--{if !empty($postlist[$post[pid]]['totalrate'])}-->
						<strong><a href="forum.php?mod=misc&action=viewratings&amp;tid=$_G[tid]&amp;pid=$post[pid]" onclick="showWindow('viewratings', this.href)" title="{lang thread_rate_log_lately}">{echo count($postlist[$post[pid]][totalrate]);}</a></strong>
						<p>{lang thread_rate_count}</p>
					<!--{/if}-->
				</dt>
				<dd>
			<!--{/if}-->
				<ul class="cl">
				<div id="post_rate_$post[pid]"></div>
				<!--{if $_G['setting']['ratelogon']}-->
					<ul class="ratl cl">
					<!--{loop $post['ratelog'] $uid $ratelog}-->
						<li id="rate_{$post[pid]}_{$uid}">
							<a href="home.php?mod=space&uid=$uid" target="_blank">{echo discuz_uc_avatar($uid, 'small');}</a><a href="home.php?mod=space&uid=$uid" target="_blank">$ratelog[username]:</a>
							$ratelog[reason]
							<!--{loop $ratelog['score'] $id $score}-->
								<!--{if $score > 0}-->
									<em>{$_G['setting']['extcredits'][$id][title]} + $score $_G['setting']['extcredits'][$id][unit]</em>
								<!--{else}-->
									<span>{$_G['setting']['extcredits'][$id][title]} $score $_G['setting']['extcredits'][$id][unit]</span>
								<!--{/if}-->
							<!--{/loop}-->
						</li>
					<!--{/loop}-->
				</ul>
				<!--{else}-->
					<!--{loop $post['ratelog'] $uid $ratelog}-->
						<li>
							<div id="rate_{$post[pid]}_{$uid}_menu" class="attp" style="display: none;">
								<p class="crly">$ratelog[reason] &nbsp;&nbsp;
									<!--{loop $ratelog['score'] $id $score}-->
										<!--{if $score > 0}-->
											<em>{$_G['setting']['extcredits'][$id][title]} + $score $_G['setting']['extcredits'][$id][unit]</em>
										<!--{else}-->
											<span>{$_G['setting']['extcredits'][$id][title]} $score $_G['setting']['extcredits'][$id][unit]</span>
										<!--{/if}-->
									<!--{/loop}-->
								</p>
								<p class="mncr"></p>
							</div>
							<p id="rate_{$post[pid]}_{$uid}" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})" class="mtn mbn"><a href="home.php?mod=space&uid=$uid" target="_blank" class="avt">{echo discuz_uc_avatar($uid, 'small');}</a></p>
							<p><a href="home.php?mod=space&uid=$uid" target="_blank">$ratelog[username]</a></p>
						</li>
					<!--{/loop}-->
				<!--{/if}-->
				</ul>
			</dd>
		</dl>
	<!--{else}-->
		<div id="post_rate_div_$post[pid]"></div>
	<!--{/if}-->
	<!--{/if}-->
	<!--{if $post['first'] && !$_G['forum_thread']['archiveid']}-->
		<!--{if !empty($lastmod['modaction'])}--><div class="modact"><a href="forum.php?mod=misc&action=viewthreadmod&amp;tid=$_G[tid]" title="{lang thread_mod}" onclick="showWindow('viewthreadmod', this.href)">{lang thread_mod_by}</a></div><!--{/if}-->
		<div class="uo{if $_G['group']['allowrecommend'] && $_G['setting']['recommendthread'][status]} nrate{/if}">
			<!--{if $_G[uid]}-->
				<a href="home.php?mod=spacecp&ac=favorite&type=thread&id=$_G[tid]&handlekey=forumthread" id="k_favorite" onclick="showWindow(this.id, this.href, 'get', 0);">{lang thread_favorite}</a>
				<a href="home.php?mod=spacecp&ac=share&type=thread&id=$_G[tid]" id="k_share" onclick="showWindow(this.id, this.href, 'get', 0);">{lang thread_share}</a>
			<!--{/if}-->
			<!--{if $_G['group']['allowrecommend'] && $_G['setting']['recommendthread'][status]}-->
				<div id="ajax_recommendlink">
					<div id="recommendv" onclick="switchrecommendv()" title="{lang recommends}"{if $_G['setting']['recommendthread'][defaultshow]} style="display: none"{/if}>$_G[forum_thread][recommends]</div>
					<ul id="recommendav" onclick="switchrecommendv()" title="{lang recommends}"{if !$_G['setting']['recommendthread'][defaultshow]} style="display: none"{/if} class="recommend_act cl">
						<li id="recommendv_add" title="$_G['setting']['recommendthread'][addtext]{lang recommends_users}">$_G[forum_thread][recommend_add]</li>
						<li id="recommendv_subtract"  title="$_G['setting']['recommendthread'][subtracttext]{lang recommends_users}">$_G[forum_thread][recommend_sub]</li>
					</ul>
					<ul class="recommend_act cl">
						<li><a id="recommend_add" {if $_G['uid']}href="forum.php?mod=misc&action=recommend&amp;do=add&amp;tid=$_G[tid]" onclick="ajaxmenu(this, 3000, 1, 0, '43', 'recommendupdate({$_G['group']['allowrecommend']})');;doane(event);"{else}href="member.php?mod=logging&action=login" onclick="showWindow('login', this.href)"{/if}>$_G['setting']['recommendthread'][addtext]</a></li>
						<li><a id="recommend_subtract"{if $_G['uid']}href="forum.php?mod=misc&action=recommend&amp;do=subtract&amp;tid=$_G[tid]" onclick="ajaxmenu(this, 3000, 1, 0, '43', 'recommendupdate(-{$_G['group']['allowrecommend']})');;doane(event);"{else}href="member.php?mod=logging&action=login" onclick="showWindow('login', this.href)"{/if}>$_G['setting']['recommendthread'][subtracttext]</a></li>
					</ul>
				</div>
			<!--{/if}-->
			{hook/viewthread_useraction}
		</div>
	<!--{/if}-->
</div>